Optimal. Leaf size=40 \[ a x (B+i A)+\frac{a A \log (\sin (c+d x))}{d}-\frac{i a B \log (\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0711095, antiderivative size = 40, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {3589, 3475, 3531} \[ a x (B+i A)+\frac{a A \log (\sin (c+d x))}{d}-\frac{i a B \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3589
Rule 3475
Rule 3531
Rubi steps
\begin{align*} \int \cot (c+d x) (a+i a \tan (c+d x)) (A+B \tan (c+d x)) \, dx &=(i a B) \int \tan (c+d x) \, dx+\int \cot (c+d x) (a A+a (i A+B) \tan (c+d x)) \, dx\\ &=a (i A+B) x-\frac{i a B \log (\cos (c+d x))}{d}+(a A) \int \cot (c+d x) \, dx\\ &=a (i A+B) x-\frac{i a B \log (\cos (c+d x))}{d}+\frac{a A \log (\sin (c+d x))}{d}\\ \end{align*}
Mathematica [A] time = 0.0557537, size = 49, normalized size = 1.22 \[ \frac{a A (\log (\tan (c+d x))+\log (\cos (c+d x)))}{d}+i a A x-\frac{i a B \log (\cos (c+d x))}{d}+a B x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.059, size = 56, normalized size = 1.4 \begin{align*} iAax+{\frac{iAac}{d}}-{\frac{iBa\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}+aBx+{\frac{Aa\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}+{\frac{Bac}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.71528, size = 66, normalized size = 1.65 \begin{align*} \frac{2 \,{\left (d x + c\right )}{\left (i \, A + B\right )} a -{\left (A - i \, B\right )} a \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 2 \, A a \log \left (\tan \left (d x + c\right )\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.38504, size = 103, normalized size = 2.58 \begin{align*} \frac{-i \, B a \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + A a \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 2.49193, size = 92, normalized size = 2.3 \begin{align*} \operatorname{RootSum}{\left (z^{2} d^{2} + z \left (- A a d + i B a d\right ) - i A B a^{2}, \left ( i \mapsto i \log{\left (- \frac{2 i i d}{i A a e^{2 i c} - B a e^{2 i c}} + \frac{i A + B}{i A e^{2 i c} - B e^{2 i c}} + e^{2 i d x} \right )} \right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.44866, size = 104, normalized size = 2.6 \begin{align*} -\frac{i \, B a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) + i \, B a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) - A a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) + 2 \,{\left (A a - i \, B a\right )} \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]